const busi = {
  busiCode: { type: 'string', description: '业务状态' },
  msg: { type: 'string', description: '业务描述' }
}

const baseInfo = {
  id: { type: 'string', description: '简历模块id' },
  name: { type: 'string', description: '姓名' },
  gender: { type: 'integer', description: '性别（0-女，1-男）' },
  birthday: { type: 'string', description: '出生日期' },
  address: { type: 'string', description: '目前所在地' },
  highestEdu: { type: 'string', description: '最高学历（1-博士，2-硕士，3-本科，4-专科）' },
  phone: { type: 'string', description: '手机号码' },
  email: { type: 'string', description: '邮箱' },
  currentIdentity: { type: 'string', description: '当前身份（0-学生，1-非学生）' },
  startWorkTime: { type: 'string', description: '开始工作时间' },
  certificateType: { type: 'string', description: '证件类型（1-身份证，2-护照，3-港澳通行证，4-台胞证，5-军官证，6-其他）' },
  certificate: { type: 'string', description: '证件号码' },
  nationality: { type: 'string', description: '籍贯' },
  politics: { type: 'string', description: '政治面貌（1-群众，2-共青团员，3-中共党员，4-其他）' },
  imgSrc: { type: 'string', description: '照片路径' }
}

const education = {
  id: { type: 'string', description: '简历模块id' },
  degree: { type: 'integer', description: '学历（1-博士，2-硕士，3-本科，4-专科）' },
  school: { type: 'string', description: '学校' },
  major: { type: 'string', description: '专业' },
  ranking: { type: 'integer', description: '专业排名（1-前1%，2-1%~5%，3-5%~20%，4-20%~50%）' },
  startTime: { type: 'string', description: '开始时间' },
  endTime: { type: 'string', description: '结束时间' }
}

const project = {
  id: { type: 'string', description: '简历模块id' },
  project: { type: 'string', description: '项目' },
  post: { type: 'string', description: '职位' },
  description: { type: 'string', description: '项目描述' },
  startTime: { type: 'string', description: '开始时间' },
  endTime: { type: 'string', description: '结束时间' }
}

const campus = {
  id: { type: 'string', description: '简历模块id' },
  organization: { type: 'string', description: '组织' },
  post: { type: 'string', description: '职位' },
  description: { type: 'string', description: '描述' },
  startTime: { type: 'string', description: '开始时间' },
  endTime: { type: 'string', description: '结束时间' }
}

const reward = {
  id: { type: 'string', description: '简历模块id' },
  reward: { type: 'string', description: '所获奖项' },
  rewardTime: { type: 'string', description: '获奖时间' }
}

const intention = {
  id: { type: 'string', description: '简历模块id' },
  expectedJobPlace: { type: 'string', description: '期望工作地点' },
  expectedSalary: { type: 'string', description: '期望薪资' },
  expectedPost: { type: 'string', description: '期望职位' },
  arrivalTime: { type: 'string', description: '到岗时间' }
}

const job = {
  id: { type: 'string', description: '简历模块id' },
  company: { type: 'string', description: '公司' },
  post: { type: 'string', description: '职位' },
  description: { type: 'string', description: '工作描述' },
  startTime: { type: 'string', description: '开始时间' },
  endTime: { type: 'string', description: '结束时间' }
}

const attachment = {
  id: { type: 'string', description: '简历模块id' },
  attachmentPath: { type: 'string', description: '附件路径' },
  name: { type: 'string', description: '附件名称' }
}

const skill = {
  skill: { type: 'string', description: '个人技能' }
}

const assessment = {
  assessment: { type: 'string', description: '自我评价' }
}

module.exports = {
  editResumeReq: {
    name: { type: 'string', description: '简历名称' }
  },
  createResumeReq: {
    type: { type: 'integer', description: '招聘类型（1-社会招聘，2-校园招聘，3-实习生招聘）' },
    resumeType: { type: 'integer', description: '简历类型 1.20秒简历 2.完整简历 3.附件简历' },
    name: { type: 'string', description: '简历名称' },
    attachmentPath: { type: 'string', description: '附件简历地址' }
  },
  resumeRes: {
    id: { type: 'string', description: '简历所属id' },
    name: { type: 'string', description: '简历名称' },
    type: { type: 'integer', description: '招聘类型（1-社会招聘，2-校园招聘，3-实习生招聘）' },
    resumeType: { type: 'integer', description: '简历类型 1.20秒简历 2.完整简历 3.附件简历' },
    readonly: { type: 'boolean', description: '是否只读' },
    attachmentPath: { type: 'string', description: '附件简历地址' },
    createTime: { type: 'string', description: '创建时间' },
    lastTime: { type: 'string', description: '修改时间' }
  },
  baseInfoData: {
    ...baseInfo
  },
  educationData: {
    ...education
  },
  projectData: {
    ...project
  },
  campusData: {
    ...campus
  },
  rewardData: {
    ...reward
  },
  intentionData: {
    ...intention
  },
  jobData: {
    ...job
  },
  attachmentData: {
    ...attachment
  },
  skillData: {
    ...skill
  },
  assessmentData: {
    ...assessment
  },
  resumeReq: {
    baseInfo: { type: 'baseInfoData' },
    education: { type: 'educationData' },
    project: { type: 'projectData' },
    campus: { type: 'campusData' },
    reward: { type: 'rewardData' },
    intention: { type: 'intentionData' },
    job: { type: 'jobData' },
    attachment: { type: 'attachmentData' },
    skill: { type: 'skillData' },
    assessment: { type: 'assessmentData' }
  },
  resumeDetailRes: {
    ...busi,
    id: { type: 'string', description: '主键id' },
    userid: { type: 'string', description: '所属用户id' },
    name: { type: 'string', description: '简历名称' },
    skill: { type: 'string', description: '个人技能' },
    assessment: { type: 'string', description: '自我评价' },
    createTime: { type: 'string', description: '创建时间' },
    lastTime: { type: 'string', description: '修改时间' },
    baseInfo: { type: 'baseInfoData' },
    education: { type: 'array', itemType: 'educationData' },
    project: { type: 'array', itemType: 'projectData' },
    campus: { type: 'array', itemType: 'campusData' },
    reward: { type: 'array', itemType: 'rewardData' },
    intention: { type: 'intentionData' },
    job: { type: 'array', itemType: 'jobData' },
    attachment: { type: 'array', itemType: 'attachmentData' }
  }
}
